from DrissionPage import WebPage, ChromiumOptions
from DrissionPage_Pligin.Set_Proxies_V2 import Set_Proxies_V2


proxy = Set_Proxies_V2()
co = ChromiumOptions()
co.set_local_port(11112)
co.add_extension(r"Extension\Porxy")
page = WebPage(chromium_options=co)
page.get("https://www.ip138.com/")
while True:
    host = input("host:")
    port = input("port:")
    # _dict = {
    #     "scheme": "http",
    #     "host": "your-proxy-ip",
    #     "port": 1234,
    #     "username": "your-username",
    #     "password": "your-password",
    # }
    proxy.Set_Ip(host,port)
    page.refresh()
